<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:78:"E:\phpstudy2016\WWW\shopsum\public/../application/admin\view\system\index.html";i:1520653387;s:57:"E:\phpstudy2016\WWW\shopsum\application\public\admin.html";i:1520912952;}*/ ?>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>系统日志-<?php echo \think\Config::get('title'); ?></title>
    <link rel="stylesheet" href="../../../../public/static/public/boo3/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.css">
    <link rel="stylesheet" href="__PUBLIC__/index/css/sytle.css">
    <script src="__PUBLIC__/public/js/jquery-2.1.4.min.js"></script>
    <script src="__PUBLIC__/public/js/vue.min.js"></script>
    <script src="__PUBLIC__/public/js/jquery.transit.js"></script>
    <script src="__PUBLIC__/public/js/jquery.timers-1.2.js"></script>
    <script src="__PUBLIC__/public/layer-v3.1.1/layer/layer.js"></script>
    <style>
        #container{
            padding: 0 30px;
        }
        nav{
            background-color: #f5f5f5;
            padding: 10px 20px;
            z-index: 99;
            margin-bottom: 15px;
        }
        @media screen and (max-width: 800px) {
            nav{
                display: none;
            }
        }
    </style>
    <script>
        var DINDEX = '/admin/index';
        var DUSER = '/admin/user';
        var DADMIN = '/admin';
        var DJOURNALISM = '/admin/journalism';
        var DCOUNT = '/admin/count';
        //页面
        function yeMian(url,fn = 1,this_json = {title:'信息',area:['400px','450px']}) {

            var index = layer.open($.extend({type:2,content:url,end:function () {
                    if(typeof fn != 'number' ){
                        fn();
                    }
                }},this_json));
        }

        //看图
        function loock_img(url) {
            url = url.data('img');
            if((typeof url) != 'string'){
                layer.msg('没有数据查看',{icon:2});
                return;
            }
            layer.open({
                type:2,
                title:false,
                closeBtn:false,
                area:['100%','100%'],
                content:"<?php echo url('loock/index',['on'=>'true']); ?>?url="+url
            })
        }
    </script>
    

</head>
<body>

<nav>
       <small><i class="fa fa-institution"></i></small> 首页 > <?php echo \think\Config::get('this_user_name'); if(\think\Request::instance()->param('on') == 'true'): ?>
       <a href="javascript:;" onclick="parent.layer.close(parent.layer.getFrameIndex(window.name));"  title="关闭当前页面" class="btn btn-xs btn-default fa-pull-right " style="margin-left: 10px"><i class="fa fa-close"></i></a>
        <?php endif; ?>
    <a href="javascript:location.reload();" title="刷新" class="btn btn-xs btn-success fa-pull-right"><i class="fa fa-refresh"></i></a>
</nav>


    <div id="container">
        <div>
            <form action="" method="post" id="form">
                <input type="hidden" name="index" :value="index">
                <div class="form-group input-group col-xs-3 pull-left col-xs-offset-2">
                    <label class="input-group-addon"><?php echo lang('IP'); ?></label>
                    <input type="text" class="form-control" name="ip">
                </div>
                <div class="form-group input-group pull-left">&nbsp;&nbsp;</div>
                <div class="form-group input-group col-xs-3 pull-left">
                    <label class="input-group-addon"><?php echo lang('关键字'); ?></label>
                    <input type="text" class="form-control" name="text">
                </div>
                <div class="form-group input-group pull-left">&nbsp;&nbsp;</div>
                <div class="form-group input-group col-xs-3 pull-left">
                    <a href="javascript:;" class="btn btn-info" @click="qqqq()"><i class=""></i><?php echo lang('搜索按钮'); ?></a>
                </div>

            </form>
        </div>
        <div class="clearfix"></div>
        <div style="height: 20px;"></div>
       <div class="table-responsive">
           <table class="table table-bordered table-hover" v-cloak>
               <thead>
               <tr class="active">
                   <th colspan="5">
                       <span class="fa-pull-right">总 <strong>{{count}}</strong> 条</span>
                   </th>
               </tr>
               <tr class="active">
                       <th width="10%">编号</th>
                       <th width="15%">时间</th>
                       <th width="10%">IP</th>
                       <th width="10%">操作人</th>
                       <th width="20%">操作详细</th>
                   </tr>
               </thead>
               <tbody>
                   <template v-for="(key,index) in list">
                       <tr>
                           <td>{{key.riid}}</td>
                           <td>{{key.rinew_time}}</td>
                           <td>{{key.riip}}</td>
                           <td>{{key.adminname}}</td>
                           <td :title="key.ritext">{{(key.ritext).slice(0,10)}}...</td>
                       </tr>
                   </template>
               </tbody>
           </table>
           <div id="Pagination"></div>
       </div>
    </div>


</body>
</html>

<link rel="stylesheet" href="__PUBLIC__/public/page/pagination.css">
<script src="__PUBLIC__/public/page/jquery.pagination.js"></script>
<script>
    (()=>{
        const app = new Vue({
            el:'#container',
            data:{
                list:[],
                index:0,//记住第几页,
                count:0
                ,wh:{name:false}//记住旧的刷选条件
            }
        });

        //点击搜索 事件
        app.qqqq = function () {

            app.index = 0;
            app.wh = $('#form').serialize().replace(/\=\w+/,'=0');
            get_data(function (da) {
                app.list = da[0];
                pag(da);
            })
        }
        app.wh = $('#form').serialize();
        //初始化数据
        get_data(function (da) {
            app.wh = $('#form').serialize();
            app.list = da[0];
            /*添加页面按钮*/
            pag(da);
        });
        function pag(da) {
            app.count = da[1];
            $("#Pagination").pagination(da[1],{
                items_per_page:30,
                callback:function (fnindex) {
                    app.index = fnindex;
                    app.wh = app.wh.replace(/\=\w+/,'='+app.index);
                    get_data(function (da) {
                        app.list = da[0];
                    });
                }
            });
        }

        function get_data(fn = 1) {
            $.post(DADMIN+'/system/index',app.wh,function (da) {
                fn(da);
            })
        }








    })();
</script>
